Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use slice::from_raw_parts for uninitialized memory #45

Merged
merged 1 commit into from
Mar 19, 2020

Conversation

CAD97
Copy link
Owner

@CAD97 CAD97 commented Mar 19, 2020

This is a very annoying incorrect usage of slice::from_raw_parts rather than slice_from_raw_parts.

This is a freshly allocated pointer, and specifically a pointer to uninitialized memory. So (when available) it is sound to use ptr::slice_from_raw_parts_mut and unsound to use slice::from_raw_parts_mut.

Yay for yanking another version.

bors: r+

@bors
Copy link
Contributor

bors bot commented Mar 19, 2020

Build succeeded

@bors bors bot merged commit afe2036 into master Mar 19, 2020
@bors bors bot deleted the soundness-typo branch March 19, 2020 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant